/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package VoiceIdent;

import GUI.MainFrame;
import model.User;

/**
 *
 * @author JArik
 */
public class SPitch {

    private static boolean started=false;
    private static VoiceGUI vGUI;

    public static void setActiveUser(User nUser) {
        vGUI.setActiveUser(nUser);
    }
    public static void start(MainFrame mf)
    {
        started = true;
        vGUI = VoiceGUI.run(mf);
    }

    public static void start(MainFrame mf,int x,int y)
    {
        started = true;
        vGUI = VoiceGUI.run(mf);
        vGUI.setLocation(x-vGUI.getWidth()/2, y);
        vGUI.setVisible(true);
    }

    public static void stop()
    {
        started = false;
        vGUI = null;
    }

    public static boolean isStarted()
    {
        return started;
    }

    public static void toFront() {
        vGUI.toFront();
    }

}
